package com.big.app.controller;

import com.big.app.entity.Ktv;
import com.big.app.service.intf.KtvService;
import com.big.app.vo1.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/ktv/")
@CrossOrigin //跨域
@Api(value = "实现KTV相关操作",tags = "实现KTV相关操作")
public class KtvController {
    @Autowired
    private KtvService service;
//    添加
    @PostMapping("add.do")
    public R add(Ktv ktv){
        return service.add(ktv);//200或400
    }
//    查询
    @GetMapping("query.do")
    public R query(){
        return service.query();//ktv对象集合
    }
}
